﻿CREATE TABLE [User].[datUser] (
    [UserID]       INT            IDENTITY (1, 1) NOT NULL,
    [Vorname]      NVARCHAR (50)  NOT NULL,
    [Nachname]     NVARCHAR (50)  NOT NULL,
    [LoginName]    NCHAR (10)     NOT NULL,
    [Gesperrt]     BIT            NULL,
    [WorkingLevel] TINYINT        NULL,
    [ValidTo]      DATETIME2 (7)  NULL,
    [EMail]        NVARCHAR (150) NULL,
    [Password]     NVARCHAR (50)  NULL,
    CONSTRAINT [PK_User_datUser] PRIMARY KEY CLUSTERED ([UserID] ASC)
);




GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_User_datUser_LoginName]
    ON [User].[datUser]([LoginName] ASC);

